package com.breakfast.fun.data.entity.user.recharge;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import java.io.Serializable;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2016/8/24.
 */
public class WeiPay implements Serializable {

    /**
     * appId : wxc3c117a5bde7ef42
     * prepayId : wx20160824114302202658d9ac0271516030
     * packages : Sign=WXPay
     * nonceStr : a8a427afafda854020c951467cc2b4b7
     * timeStamp : 1472010182
     * sign : 8188F6291E3F6A30C5CD61BB9AFE0849
     * partnerId : 1263231001
     */

    private String appId;
    private String prepayId;
    private String packages;
    private String nonceStr;
    private String timeStamp;
    private String sign;
    private String partnerId;

    public static WeiPay objectFromData(String str) {

        return new Gson().fromJson(str, WeiPay.class);
    }

    public static List<WeiPay> arrayWeiPayFromData(String str) {

        Type listType = new TypeToken<ArrayList<WeiPay>>() {
        }.getType();

        return new Gson().fromJson(str, listType);
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getPrepayId() {
        return prepayId;
    }

    public void setPrepayId(String prepayId) {
        this.prepayId = prepayId;
    }

    public String getPackages() {
        return packages;
    }

    public void setPackages(String packages) {
        this.packages = packages;
    }

    public String getNonceStr() {
        return nonceStr;
    }

    public void setNonceStr(String nonceStr) {
        this.nonceStr = nonceStr;
    }

    public String getTimeStamp() {
        return timeStamp;
    }

    public void setTimeStamp(String timeStamp) {
        this.timeStamp = timeStamp;
    }

    public String getSign() {
        return sign;
    }

    public void setSign(String sign) {
        this.sign = sign;
    }

    public String getPartnerId() {
        return partnerId;
    }

    public void setPartnerId(String partnerId) {
        this.partnerId = partnerId;
    }
}
